/*
 * Copyright (c) 2014.
 * 我的阿姨帮项目版权所有
 * 项目由电子科大网络学院相关人员开发
 */

package com.lemon.smartsafety.update;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Environment;
import android.util.Log;

import com.lemon.smartsafety.app.Constants;

import java.io.File;

public class ReplaceBroadcastReceiver extends BroadcastReceiver {
    private static final String TAG = "ApkDelete";

    @Override
    public void onReceive(Context arg0, Intent arg1) {
        File downLoadApk = new File(Environment.getExternalStorageDirectory(), Constants.APP_DOWNLOAD_FILE_NAME);
        if (downLoadApk.exists()) {
            downLoadApk.delete();
        }
        Log.i(TAG, "downLoadApkFile was deleted!");
    }

}
